package cn.maihe.elg.operation.exception;

/**
 * @author JHWei
 */
public class GuaranteeCheckRuntimeException extends RuntimeException {
    public String getCode() {
        return code;
    }

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误信息参数
     */
    private String message;

    public GuaranteeCheckRuntimeException() {
    }
    public GuaranteeCheckRuntimeException(String code) {
        this.code = code;
    }

    public GuaranteeCheckRuntimeException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
    public static GuaranteeCheckRuntimeException of(String code) {
        return new GuaranteeCheckRuntimeException(code);
    }


    public GuaranteeCheckRuntimeException message(String message) {
        this.message = message;
        return this;
    }

}
